home *** CD-ROM | disk | FTP | other *** search
/ A.C.E. 3 / ACE CD 3.iso / files / utils / aplay200.lha / APlayer / HDInstall next >
Text File  |  1995-12-24  |  48KB  |  1,530 lines

  1. ;**************************************************************************
  2. ;*                                                                        *
  3. ;*                 Installer Script For Accessible Player                 *
  4. ;*                                                                        *
  5. ;*                            Update 27/12-1995                           *
  6. ;*                                                                        *
  7. ;**************************************************************************
  8.  
  9. ;--------------------------------------------------------------------------
  10. ; Procedures
  11.  
  12. (procedure InstallLib
  13.     (working ("Testing %s" libname))
  14.     (copylib
  15.         (prompt ("Do you want to install the \"%s\"?" libname))
  16.         (help @copylib-help)
  17.         (source (tackon tempdir libname))
  18.         (dest libdest)
  19.         (confirm)
  20.     )
  21. )
  22.  
  23. (procedure DeleteAll
  24.     (if (exists deldir)
  25.         (foreach deldir "#?"
  26.             (delete (tackon deldir @each-name)
  27.                 (optional force)
  28.             )
  29.         )
  30.     )
  31. )
  32.  
  33. ;--------------------------------------------------------------------------
  34. ; ** Install Procedure
  35.  
  36. (procedure Install
  37.     (message "This version of APlayer is shareware. "
  38.              "Without registration you will miss some of APlayer "
  39.              "features. On how to register, read the guide.\n\n"
  40.              "If you still want to install press proceed else abort."
  41.     )
  42.  
  43.     (message "You are now about to install the APlayer program. "
  44.              "You will first be asked for all the different files "
  45.              "you can install and then this script will begin to "
  46.              "install the files."
  47.     )
  48.  
  49.     (set default-dest
  50.         (askdir
  51.             (prompt "Where do you want to make the APlayer drawer?")
  52.             (help @askdir-help)
  53.             (default @default-dest)
  54.         )
  55.     )
  56.     (set @default-dest default-dest)
  57.  
  58.  
  59.     (set fileflag
  60.         (askoptions
  61.             (prompt "Which files do you want to install in the "
  62.                     "\"APlayer\" drawer?")
  63.             (help @askoptions-help)
  64.             (choices
  65.                 "APlayer"
  66.                 "Commercial Picture"
  67.             )
  68.         )
  69.     )
  70.  
  71.  
  72.     (set play
  73.         (askbool
  74.             (prompt "Do you want to install external players?")
  75.             (help "If you select yes, you can select between all the "
  76.                   "external players this version support. All the players "
  77.                   "will be stored in your \"LIBS:APlayer\" drawer.")
  78.         )
  79.     )
  80.  
  81.     (set playflag1 0)
  82.     (set playflag2 0)
  83.     (set playflag3 0)
  84.     (set playflag4 0)
  85.     (set playflag5 0)
  86.     (set playflag6 0)
  87.     (set playflag7 0)
  88.     (set playflag8 0)
  89.     (if play
  90.         (
  91.             (set playflag1
  92.                 (askoptions
  93.                     (prompt "Which external players do you want to install in "
  94.                             "your \"LIBS:APlayer\" drawer?")
  95.                     (help @askoptions-help)
  96.                     (choices
  97.                         "Action Amics"
  98.                         "Activision Pro"
  99.                         "Art of Noise"
  100.                         "DeliCustom"
  101.                         "Delta 2.0"
  102.                         "Digital Mugician"
  103.                         "DSS"
  104.                         "FastTracker"
  105.                     )
  106.                 )
  107.             )
  108.  
  109.             (set playflag2
  110.                 (askoptions
  111.                     (prompt "Which external players do you want to install in "
  112.                             "your \"LIBS:APlayer\" drawer?")
  113.                     (help @askoptions-help)
  114.                     (choices
  115.                         "FastTracker 2.0"
  116.                         "Fred"
  117.                         "Face The Music"
  118.                         "Future Composer 1.0-1.3"
  119.                         "Future Composer 1.4"
  120.                         "Hippel-COSO"
  121.                         "Hippel"
  122.                         "IFF-8SVX"
  123.                     )
  124.                 )
  125.             )
  126.  
  127.             (set playflag3
  128.                 (askoptions
  129.                     (prompt "Which external players do you want to install in "
  130.                             "your \"LIBS:APlayer\" drawer?")
  131.                     (help @askoptions-help)
  132.                     (choices
  133.                         "IFF-AIFF"
  134.                         "IFF-SMUS"
  135.                         "In Stereo!"
  136.                         "JamCracker"
  137.                         "J.C. Brooke"
  138.                         "Major Tom"
  139.                         "Maniacs of Noise"
  140.                         "Mark Cooksey"
  141.                     )
  142.                 )
  143.             )
  144.  
  145.             (set playflag4
  146.                 (askoptions
  147.                     (prompt "Which external players do you want to install in "
  148.                             "your \"LIBS:APlayer\" drawer?")
  149.                     (help @askoptions-help)
  150.                     (choices
  151.                         "Mark II"
  152.                         "MED"
  153.                         "MultiTracker"
  154.                         "Music Assembler"
  155.                         "Noise Packer 2.0"
  156.                         "Noise Packer 3.0"
  157.                         "OctaMed"
  158.                         "Oktalyzer"
  159.                     )
  160.                 )
  161.             )
  162.  
  163.             (set playflag5
  164.                 (askoptions
  165.                     (prompt "Which external players do you want to install in "
  166.                             "your \"LIBS:APlayer\" drawer?")
  167.                     (help @askoptions-help)
  168.                     (choices
  169.                         "Puma Tracker"
  170.                         "Quadra Composer"
  171.                         "RIFF-WAVE"
  172.                         "Ron Klaren"
  173.                         "ScreamTracker 3.0"
  174.                         "SID"
  175.                         "SidMon 1.0"
  176.                         "SidMon 2.0"
  177.                     )
  178.                 )
  179.             )
  180.  
  181.             (set playflag6
  182.                 (askoptions
  183.                     (prompt "Which external players do you want to install in "
  184.                             "your \"LIBS:APlayer\" drawer?")
  185.                     (help @askoptions-help)
  186.                     (choices
  187.                         "Sonic Arranger"
  188.                         "Sound Control"
  189.                         "Sound Factory"
  190.                         "Sound FX 1.3"
  191.                         "Sound FX 2.0"
  192.                         "Sound Monitor 2.0"
  193.                         "Sound Monitor 2.2"
  194.                         "StarTrekker 4"
  195.                     )
  196.                 )
  197.             )
  198.  
  199.             (set playflag7
  200.                 (askoptions
  201.                     (prompt "Which external players do you want to install in "
  202.                             "your \"LIBS:APlayer\" drawer?")
  203.                     (help @askoptions-help)
  204.                     (choices
  205.                         "StarTrekker 4AM"
  206.                         "Synthesis"
  207.                         "TakeTracker"
  208.                         "TFMX 1.5"
  209.                         "TFMX 7-Voices"
  210.                         "TFMX Professional"
  211.                         "The Musical Enlightenment"
  212.                         "Tim Folin"
  213.                     )
  214.                 )
  215.             )
  216.  
  217.             (set playflag8
  218.                 (askoptions
  219.                     (prompt "Which external players do you want to install in "
  220.                             "your \"LIBS:APlayer\" drawer?")
  221.                     (help @askoptions-help)
  222.                     (choices
  223.                         "Tronic Tracker"
  224.                         "Vector Dean"
  225.                         "Voodoo Supreme Synthesizer"
  226.                         "Whittaker"
  227.                     )
  228.                 )
  229.             )
  230.         )
  231.     )
  232.  
  233.     (set noteplay
  234.         (askbool
  235.             (prompt "Do you want to install external NotePlayers?")
  236.             (help "If you select yes, you can select between all the "
  237.                   "external NotePlayers this version support. All the "
  238.                   "NotePlayers will be stored in your \"LIBS:APlayer/NotePlayers\" drawer.")
  239.         )
  240.     )
  241.  
  242.     (set noteplayflag1 0)
  243.     (if noteplay
  244.         (
  245.             (set noteplayflag1
  246.                 (askoptions
  247.                     (prompt "Which external NotePlayers do you want to install in "
  248.                             "your \"LIBS:APlayer/NotePlayers\" drawer?")
  249.                     (help @askoptions-help)
  250.                     (choices
  251.                         "14 Bit Stereo - 2 Voices"
  252.                         "14 Bit Stereo - 32 Voices"
  253.                         "FastMem - 4 Voices"
  254.                         "Mono - 32 Voices"
  255.                         "Real Surround - 32 Voices"
  256.                         "Stereo - 32 Voices"
  257.                         "Surround - 32 Voices"
  258.                     )
  259.                 )
  260.             )
  261.         )
  262.     )
  263.  
  264.  
  265.     (set agent
  266.         (askbool
  267.             (prompt "Do you want to install external Agents?")
  268.             (help "If you select yes, you can select between all the "
  269.                   "external Agents this version support. All the "
  270.                   "Agents will be stored in your \"LIBS:APlayer/Agents\" drawer.")
  271.         )
  272.     )
  273.  
  274.     (set agentflag1 0)
  275.     (if agent
  276.         (
  277.             (set agentflag1
  278.                 (askoptions
  279.                     (prompt "Which external Agents do you want to install in "
  280.                             "your \"LIBS:APlayer/Agents\" drawer?")
  281.                     (help @askoptions-help)
  282.                     (choices
  283.                         "Favourite Song System"
  284.                         "Multi - Sample Saver"
  285.                         "Bar - Scope"
  286.                         "RGBBox - Scope"
  287.                         "SpinSquare - Scope"
  288.                     )
  289.                 )
  290.             )
  291.  
  292.             (set multiflag1 0)
  293.             (if (in agentflag1 1)
  294.                 (
  295.                     (set multiflag1
  296.                         (askoptions
  297.                             (prompt "You have selected the Multi-SampleSaver agent. "
  298.                                     "Which sample modules do you want to install?")
  299.                             (help @askoptions-help)
  300.                             (choices
  301.                                 "IFF-8SVX"
  302.                                 "IFF-AIFF"
  303.                                 "Raw"
  304.                                 "RIFF-WAVE"
  305.                             )
  306.                         )
  307.                     )
  308.                 )
  309.             )
  310.         )
  311.     )
  312.  
  313.  
  314.     (set libs
  315.         (askoptions
  316.             (prompt "Which other libraries do you want to install in your "
  317.                     "\"LIBS:\" drawer?  Press help for more info.")
  318.             (help "This is some libraries the APlayer uses or can use. "
  319.                   "Here follow a little description of the different "
  320.                   "libraries:\n\n"
  321.                   "PlaySID.library: This library are used in the SID "
  322.                   "player. That means, if you want to hear some C64 SID "
  323.                   "tunes, you have to install this library.\n\n"
  324.                   "Powerpacker.library: APlayer can use this library to "
  325.                   "decrunch powerpacked modules.\n\n"
  326.                   "Reqtools.library: This library is required by APlayer. "
  327.                   "With this library APlayer shows filerequesters etc.\n\n"
  328.                   "Rexxtools.library: If you want ARexx in APlayer, you "
  329.                   "have to install this library. It helps APlayer to make "
  330.                   "the ARexx interface.\n\n"
  331.                   "Xpkmaster.library: APlayer can also use this library to "
  332.                   "decrunch both powerpacked and xpk packed modules.\n\n"
  333.                   "Unpack.library: This library can decrunch a lot of "
  334.                   "different types of crunched modules. See the unpack.doc "
  335.                   "for more information.")
  336.             (choices
  337.                 "PlaySID.library"
  338.                 "Powerpacker.library"
  339.                 "Reqtools.library"
  340.                 "Rexxtools.library"
  341.                 "Xpkmaster.library"
  342.                 "Unpack.library"
  343.             )
  344.         )
  345.     )
  346.  
  347.  
  348.     (set cpu (database "cpu"))
  349.     (if (< cpu 68020)
  350.         (set marked 3)
  351.         (set marked 5)
  352.     )
  353.  
  354.     (set xpk
  355.         (askoptions
  356.             (prompt "Which xpk libraries do you want to install in your "
  357.                     "\"LIBS:compressors\" drawer?")
  358.             (help @askoptions-help)
  359.             (choices
  360.                 "xpkSMPL.library"
  361.                 "xpkSQSH.library (68000)"
  362.                 "XpkSQSH.library (68020)"
  363.             (default marked)
  364.             )
  365.         )
  366.     )
  367.  
  368.  
  369.     (set arexx
  370.         (askbool
  371.             (prompt "Do you want to install ARexx?")
  372.             (help @askbool-help)
  373.         )
  374.     )
  375.  
  376.  
  377.     (set doc
  378.         (askbool
  379.             (prompt "Do you want to install docs?")
  380.             (help "If you select yes, you can select between all the "
  381.                   "different docs. All the docs will be install in the "
  382.                   "\"APlayer/Docs\" drawer.")
  383.         )
  384.     )
  385.  
  386.     (set docflag 0)
  387.     (if doc
  388.         (set docflag
  389.             (askoptions
  390.                 (prompt "Which files do you want to install in the "
  391.                         "\"APlayer/Docs\" drawer?")
  392.                 (help @askoptions-help)
  393.                 (choices
  394.                     "APlayer.guide"
  395.                     "MissingModules.txt"
  396.                     "PlaySid.doc"
  397.                     "SMPL.doc"
  398.                     "SQSH.doc"
  399.                     "Unpack.guide"
  400.                     "RegistrationForm"
  401.                     "Installer Script"
  402.                 )
  403.             )
  404.         )
  405.     )
  406.  
  407.  
  408.     (set developer
  409.         (askbool
  410.             (prompt "Do you want to install the developer set?")
  411.             (help @askbool-help)
  412.         )
  413.     )
  414.  
  415. ; ** Begin to copy the files
  416.  
  417.     (set @default-dest (tackon @default-dest "APlayer"))
  418.     (set lhex (tackon sdir "C/lhex"))
  419.     (set tempdir "T:apTemp")
  420.     (set deldir tempdir)
  421.  
  422.     (makedir tempdir)
  423.     (makedir @default-dest)
  424.  
  425.     (copyfiles                             ;Copy Icon To APlayer Directory
  426.         (source (tackon sdir "/APlayer.info"))
  427.         (dest (tackon @default-dest "/"))
  428.     )
  429.  
  430.     (if fileflag
  431.         (
  432.             (working "Unpacking program archive....")
  433.             (run ("\"%s\" -fqw=%s x Files/Program.lha >NIL:" lhex tempdir))
  434.  
  435.             (if (in fileflag 0)                     ;APlayer File
  436.                 (
  437.                     (set datadir (tackon @default-dest "Data"))
  438.                     (makedir datadir)
  439.                     (copyfiles
  440.                         (source (tackon tempdir "APlayer"))
  441.                         (dest @default-dest)
  442.                         (infos)
  443.                     )
  444.  
  445.                     (copyfiles
  446.                         (source (tackon tempdir "Data/Help.Nodes"))
  447.                         (dest (tackon @default-dest "Data/"))
  448.                     )
  449.  
  450.                     (copyfiles
  451.                         (source (tackon tempdir "Data/Tips.dat"))
  452.                         (dest (tackon @default-dest "Data/"))
  453.                     )
  454.  
  455.                     (copyfiles
  456.                         (source (tackon tempdir "Data/Why.dat"))
  457.                         (dest (tackon @default-dest "Data/"))
  458.                     )
  459.                 )
  460.             )
  461.  
  462.             (if (in fileflag 1)                     ;Commercial Picture
  463.                 (
  464.                     (copyfiles
  465.                         (source (tackon sdir "ShowMe.jpg"))
  466.                         (dest @default-dest)
  467.                         (infos)
  468.                     )
  469.                 )
  470.             )
  471.         (set deldir (tackon tempdir "Data"))
  472.         (DeleteAll)
  473.         (set deldir tempdir)
  474.         )
  475.     )
  476.     (complete 10)
  477.  
  478.  
  479.     (if (or (or (or (or (or (or (or playflag1 playflag2) playflag3) playflag4) playflag5) playflag6) playflag7) playflag8)
  480.         (
  481.             (makedir "LIBS:APlayer")
  482.             (working "Unpacking player archive....")
  483.             (run ("\"%s\" -fqw=%s x Files/Players.lha >NIL:" lhex tempdir))
  484.             (set libdest "LIBS:APlayer/")
  485.             (delete "LIBS:APlayer/apHolyNoise.library")
  486.  
  487.             (if playflag1
  488.                 (
  489.                     (if (in playflag1 0)
  490.                         (
  491.                             (set libname "apActionAmics.library")
  492.                             (InstallLib)
  493.                         )
  494.                     )
  495.  
  496.                     (if (in playflag1 1)
  497.                         (
  498.                             (set libname "apActivisionPro.library")
  499.                             (InstallLib)
  500.                         )
  501.                     )
  502.  
  503.                     (if (in playflag1 2)
  504.                         (
  505.                             (set libname "apArtOfNoise.library")
  506.                             (InstallLib)
  507.                         )
  508.                     )
  509.  
  510.                     (if (in playflag1 3)
  511.                         (
  512.                             (set libname "apDeliCustom.library")
  513.                             (InstallLib)
  514.                         )
  515.                     )
  516.  
  517.                     (if (in playflag1 4)
  518.                         (
  519.                             (set libname "apDelta20.library")
  520.                             (InstallLib)
  521.                         )
  522.                     )
  523.  
  524.                     (if (in playflag1 5)
  525.                         (
  526.                             (set libname "apDigitalMugician.library")
  527.                             (InstallLib)
  528.                         )
  529.                     )
  530.  
  531.                     (if (in playflag1 6)
  532.                         (
  533.                             (set libname "apDSS.library")
  534.                             (InstallLib)
  535.                         )
  536.                     )
  537.  
  538.                     (if (in playflag1 7)
  539.                         (
  540.                             (set libname "apFastTracker.library")
  541.                             (InstallLib)
  542.                         )
  543.                     )
  544.                 )
  545.             )
  546.             (complete 11)
  547.  
  548.             (if playflag2
  549.                 (
  550.                     (if (in playflag2 0)
  551.                         (
  552.                             (set libname "apFastTracker20.library")
  553.                             (InstallLib)
  554.                         )
  555.                     )
  556.  
  557.                     (if (in playflag2 1)
  558.                         (
  559.                             (set libname "apFred.library")
  560.                             (InstallLib)
  561.                         )
  562.                     )
  563.  
  564.                     (if (in playflag2 2)
  565.                         (
  566.                             (set libname "apFTM.library")
  567.                             (InstallLib)
  568.                         )
  569.                     )
  570.  
  571.                     (if (in playflag2 3)
  572.                         (
  573.                             (set libname "apFuture13.library")
  574.                             (InstallLib)
  575.                         )
  576.                     )
  577.  
  578.                     (if (in playflag2 4)
  579.                         (
  580.                             (set libname "apFuture14.library")
  581.                             (InstallLib)
  582.                         )
  583.                     )
  584.  
  585.                     (if (in playflag2 5)
  586.                         (
  587.                             (set libname "apHippel-COSO.library")
  588.                             (InstallLib)
  589.                         )
  590.                     )
  591.  
  592.                     (if (in playflag2 6)
  593.                         (
  594.                             (set libname "apHippel.library")
  595.                             (InstallLib)
  596.                         )
  597.                     )
  598.  
  599.                     (if (in playflag2 7)
  600.                         (
  601.                             (set libname "apIFF-8SVX.library")
  602.                             (InstallLib)
  603.                         )
  604.                     )
  605.                 )
  606.             )
  607.             (complete 13)
  608.  
  609.             (if playflag3
  610.                 (
  611.                     (if (in playflag3 0)
  612.                         (
  613.                             (set libname "apIFF-AIFF.library")
  614.                             (InstallLib)
  615.                         )
  616.                     )
  617.  
  618.                     (if (in playflag3 1)
  619.                         (
  620.                             (set libname "apIFF-SMUS.library")
  621.                             (InstallLib)
  622.                         )
  623.                     )
  624.  
  625.                     (if (in playflag3 2)
  626.                         (
  627.                             (set libname "apInStereo!.library")
  628.                             (InstallLib)
  629.                         )
  630.                     )
  631.  
  632.                     (if (in playflag3 3)
  633.                         (
  634.                             (set libname "apJamCracker.library")
  635.                             (InstallLib)
  636.                         )
  637.                     )
  638.  
  639.                     (if (in playflag3 4)
  640.                         (
  641.                             (set libname "apJCBrooke.library")
  642.                             (InstallLib)
  643.                         )
  644.                     )
  645.  
  646.                     (if (in playflag3 5)
  647.                         (
  648.                             (set libname "apMajorTom.library")
  649.                             (InstallLib)
  650.                         )
  651.                     )
  652.  
  653.                     (if (in playflag3 6)
  654.                         (
  655.                             (set libname "apMON.library")
  656.                             (InstallLib)
  657.                         )
  658.                     )
  659.  
  660.                     (if (in playflag3 7)
  661.                         (
  662.                             (set libname "apMarkCooksey.library")
  663.                             (InstallLib)
  664.                         )
  665.                     )
  666.                 )
  667.             )
  668.             (complete 14)
  669.  
  670.             (if playflag4
  671.                 (
  672.                     (if (in playflag4 0)
  673.                         (
  674.                             (set libname "apMarkII.library")
  675.                             (InstallLib)
  676.                         )
  677.                     )
  678.  
  679.                     (if (in playflag4 1)
  680.                         (
  681.                             (set libname "apMED.library")
  682.                             (InstallLib)
  683.                         )
  684.                     )
  685.  
  686.                     (if (in playflag4 2)
  687.                         (
  688.                             (set libname "apMultiTracker.library")
  689.                             (InstallLib)
  690.                         )
  691.                     )
  692.  
  693.                     (if (in playflag4 3)
  694.                         (
  695.                             (set libname "apMusicAss.library")
  696.                             (InstallLib)
  697.                         )
  698.                     )
  699.  
  700.                     (if (in playflag4 4)
  701.                         (
  702.                             (set libname "apNoisePacker20.library")
  703.                             (InstallLib)
  704.                         )
  705.                     )
  706.  
  707.                     (if (in playflag4 5)
  708.                         (
  709.                             (set libname "apNoisePacker30.library")
  710.                             (InstallLib)
  711.                         )
  712.                     )
  713.  
  714.                     (if (in playflag4 6)
  715.                         (
  716.                             (set libname "apOctaMed.library")
  717.                             (InstallLib)
  718.                         )
  719.                     )
  720.  
  721.                     (if (in playflag4 7)
  722.                         (
  723.                             (set libname "apOktalyzer.library")
  724.                             (InstallLib)
  725.                         )
  726.                     )
  727.                 )
  728.             )
  729.             (complete 15)
  730.  
  731.             (if playflag5
  732.                 (
  733.                     (if (in playflag5 0)
  734.                         (
  735.                             (set libname "apPumaTracker.library")
  736.                             (InstallLib)
  737.                         )
  738.                     )
  739.  
  740.                     (if (in playflag5 1)
  741.                         (
  742.                             (set libname "apQuadraComposer.library")
  743.                             (InstallLib)
  744.                         )
  745.                     )
  746.  
  747.                     (if (in playflag5 2)
  748.                         (
  749.                             (set libname "apRIFF-WAVE.library")
  750.                             (InstallLib)
  751.                         )
  752.                     )
  753.  
  754.                     (if (in playflag5 3)
  755.                         (
  756.                             (set libname "apRonKlaren.library")
  757.                             (InstallLib)
  758.                         )
  759.                     )
  760.  
  761.                     (if (in playflag5 4)
  762.                         (
  763.                             (set libname "apScreamTracker30.library")
  764.                             (InstallLib)
  765.                         )
  766.                     )
  767.  
  768.                     (if (in playflag5 5)
  769.                         (
  770.                             (set libname "apSID.library")
  771.                             (InstallLib)
  772.                         )
  773.                     )
  774.  
  775.                     (if (in playflag5 6)
  776.                         (
  777.                             (set libname "apSidMon10.library")
  778.                             (InstallLib)
  779.                         )
  780.                     )
  781.  
  782.                     (if (in playflag5 7)
  783.                         (
  784.                             (set libname "apSidMon20.library")
  785.                             (InstallLib)
  786.                         )
  787.                     )
  788.                 )
  789.             )
  790.             (complete 16)
  791.  
  792.             (if playflag6
  793.                 (
  794.                     (if (in playflag6 0)
  795.                         (
  796.                             (set libname "apSonicArranger.library")
  797.                             (InstallLib)
  798.                         )
  799.                     )
  800.  
  801.                     (if (in playflag6 1)
  802.                         (
  803.                             (set libname "apSoundControl.library")
  804.                             (InstallLib)
  805.                         )
  806.                     )
  807.  
  808.                     (if (in playflag6 2)
  809.                         (
  810.                             (set libname "apSoundFactory.library")
  811.                             (InstallLib)
  812.                         )
  813.                     )
  814.  
  815.                     (if (in playflag6 3)
  816.                         (
  817.                             (set libname "apSoundFX13.library")
  818.                             (InstallLib)
  819.                         )
  820.                     )
  821.  
  822.                     (if (in playflag6 4)
  823.                         (
  824.                             (set libname "apSoundFX20.library")
  825.                             (InstallLib)
  826.                         )
  827.                     )
  828.  
  829.                     (if (in playflag6 5)
  830.                         (
  831.                             (set libname "apSoundMon20.library")
  832.                             (InstallLib)
  833.                         )
  834.                     )
  835.  
  836.                     (if (in playflag6 6)
  837.                         (
  838.                             (set libname "apSoundMon22.library")
  839.                             (InstallLib)
  840.                         )
  841.                     )
  842.  
  843.                     (if (in playflag6 7)
  844.                         (
  845.                             (set libname "apStarTrekker4.library")
  846.                             (InstallLib)
  847.                         )
  848.                     )
  849.                 )
  850.             )
  851.             (complete 18)
  852.  
  853.             (if playflag7
  854.                 (
  855.                     (if (in playflag7 0)
  856.                         (
  857.                             (set libname "apStarTrekker4AM.library")
  858.                             (InstallLib)
  859.                         )
  860.                     )
  861.  
  862.                     (if (in playflag7 1)
  863.                         (
  864.                             (set libname "apSynthesis.library")
  865.                             (InstallLib)
  866.                         )
  867.                     )
  868.  
  869.                     (if (in playflag7 2)
  870.                         (
  871.                             (set libname "apTakeTracker.library")
  872.                             (InstallLib)
  873.                         )
  874.                     )
  875.  
  876.                     (if (in playflag7 3)
  877.                         (
  878.                             (set libname "apTFMX_15.library")
  879.                             (InstallLib)
  880.                         )
  881.                     )
  882.  
  883.                     (if (in playflag7 4)
  884.                         (
  885.                             (set libname "apTFMX_7V.library")
  886.                             (InstallLib)
  887.                         )
  888.                     )
  889.  
  890.                     (if (in playflag7 5)
  891.                         (
  892.                             (set libname "apTFMX_Pro.library")
  893.                             (InstallLib)
  894.                         )
  895.                     )
  896.  
  897.                     (if (in playflag7 6)
  898.                         (
  899.                             (set libname "apTME.library")
  900.                             (InstallLib)
  901.                         )
  902.                     )
  903.  
  904.                     (if (in playflag7 7)
  905.                         (
  906.                             (set libname "apTimFolin.library")
  907.                             (InstallLib)
  908.                         )
  909.                     )
  910.                 )
  911.             )
  912.             (complete 19)
  913.  
  914.             (if playflag8
  915.                 (
  916.                     (if (in playflag8 0)
  917.                         (
  918.                             (set libname "apTronicTracker.library")
  919.                             (InstallLib)
  920.                         )
  921.                     )
  922.  
  923.                     (if (in playflag8 1)
  924.                         (
  925.                             (set libname "apVectorDean.library")
  926.                             (InstallLib)
  927.                         )
  928.                     )
  929.  
  930.                     (if (in playflag8 2)
  931.                         (
  932.                             (set libname "apVSS.library")
  933.                             (InstallLib)
  934.                         )
  935.                     )
  936.  
  937.                     (if (in playflag8 3)
  938.                         (
  939.                             (set libname "apWhittaker.library")
  940.                             (InstallLib)
  941.                         )
  942.                     )
  943.                 )
  944.             )
  945.         (DeleteAll)
  946.         )
  947.     )
  948.     (complete 20)
  949.  
  950.  
  951.     (if noteplayflag1
  952.         (
  953.             (makedir "LIBS:APlayer/NotePlayers")
  954.             (working "Unpacking NotePlayer archive....")
  955.             (run ("\"%s\" -fqw=%s x Files/NotePlayers.lha >NIL:" lhex tempdir))
  956.             (set libdest "LIBS:APlayer/NotePlayers")
  957.  
  958.             (if (in noteplayflag1 0)
  959.                 (
  960.                     (set libname "an14BitStereo-2Voices.library")
  961.                     (InstallLib)
  962.                 )
  963.             )
  964.  
  965.             (if (in noteplayflag1 1)
  966.                 (
  967.                     (set libname "an14BitStereo-32Voices.library")
  968.                     (InstallLib)
  969.                 )
  970.             )
  971.  
  972.             (if (in noteplayflag1 2)
  973.                 (
  974.                     (set libname "anFastMem-4Voices.library")
  975.                     (InstallLib)
  976.                 )
  977.             )
  978.  
  979.             (if (in noteplayflag1 3)
  980.                 (
  981.                     (set libname "anMono-32Voices.library")
  982.                     (InstallLib)
  983.                 )
  984.             )
  985.  
  986.             (if (in noteplayflag1 4)
  987.                 (
  988.                     (set libname "anReSurround-32Voices.library")
  989.                     (InstallLib)
  990.                 )
  991.             )
  992.  
  993.             (if (in noteplayflag1 5)
  994.                 (
  995.                     (set libname "anStereo-32Voices.library")
  996.                     (InstallLib)
  997.                 )
  998.             )
  999.  
  1000.             (if (in noteplayflag1 6)
  1001.                 (
  1002.                     (set libname "anSurround-32Voices.library")
  1003.                     (InstallLib)
  1004.                 )
  1005.             )
  1006.         (DeleteAll)
  1007.         )
  1008.     )
  1009.     (complete 30)
  1010.  
  1011.  
  1012.     (if agentflag1
  1013.         (
  1014.             (makedir "LIBS:APlayer/Agents")
  1015.             (working "Unpacking Agent archive....")
  1016.             (run ("\"%s\" -fqw=%s x Files/Agents.lha >NIL:" lhex tempdir))
  1017.             (set libdest "LIBS:APlayer/Agents")
  1018.  
  1019.             (if (in agentflag1 0)
  1020.                 (
  1021.                     (set libname "aaFSS.library")
  1022.                     (InstallLib)
  1023.                 )
  1024.             )
  1025.  
  1026.             (if (in agentflag1 1)
  1027.                 (
  1028.                     (set libname "aaMulti-SampleSaver.library")
  1029.                     (InstallLib)
  1030.                 )
  1031.             )
  1032.  
  1033.             (if (in agentflag1 2)
  1034.                 (
  1035.                     (set libname "aaBar-Scope.library")
  1036.                     (InstallLib)
  1037.                 )
  1038.             )
  1039.  
  1040.             (if (in agentflag1 3)
  1041.                 (
  1042.                     (set libname "aaRGBBox-Scope.library")
  1043.                     (InstallLib)
  1044.                 )
  1045.             )
  1046.  
  1047.             (if (in agentflag1 4)
  1048.                 (
  1049.                     (set libname "aaSpinSquare-Scope.library")
  1050.                     (InstallLib)
  1051.                 )
  1052.             )
  1053.         (DeleteAll)
  1054.         )
  1055.     )
  1056.     (complete 35)
  1057.  
  1058.     (if multiflag1
  1059.         (
  1060.             (makedir "LIBS:APlayer/Agents/MSSModules")
  1061.             (working "Unpacking Multi Modules archive....")
  1062.             (run ("\"%s\" -fqw=%s x Files/MultiMods.lha >NIL:" lhex tempdir))
  1063.             (set libdest "LIBS:APlayer/Agents/MSSModules")
  1064.  
  1065.             (if (in multiflag1 0)
  1066.                 (
  1067.                     (set libname "mmIFF-8SVX.library")
  1068.                     (InstallLib)
  1069.                 )
  1070.             )
  1071.  
  1072.             (if (in multiflag1 1)
  1073.                 (
  1074.                     (set libname "mmIFF-AIFF.library")
  1075.                     (InstallLib)
  1076.                 )
  1077.             )
  1078.  
  1079.             (if (in multiflag1 2)
  1080.                 (
  1081.                     (set libname "mmRaw.library")
  1082.                     (InstallLib)
  1083.                 )
  1084.             )
  1085.  
  1086.             (if (in multiflag1 3)
  1087.                 (
  1088.                     (set libname "mmRIFF-WAVE.library")
  1089.                     (InstallLib)
  1090.                 )
  1091.             )
  1092.         (DeleteAll)
  1093.         )
  1094.     )
  1095.     (complete 40)
  1096.  
  1097.  
  1098.     (if libs
  1099.         (
  1100.             (working "Unpacking library archive....")
  1101.             (run ("\"%s\" -fqw=%s x Files/Libraries.lha >NIL:" lhex tempdir))
  1102.             (set libdest "LIBS:")
  1103.  
  1104.             (if (in libs 0)
  1105.                 (
  1106.                     (set libname "playsid.library")
  1107.                     (InstallLib)
  1108.                 )
  1109.             )
  1110.  
  1111.             (if (in libs 1)
  1112.                 (
  1113.                     (set libname "powerpacker.library")
  1114.                     (InstallLib)
  1115.                 )
  1116.             )
  1117.  
  1118.             (if (in libs 2)
  1119.                 (
  1120.                     (set libname "reqtools.library")
  1121.                     (InstallLib)
  1122.                 )
  1123.             )
  1124.  
  1125.             (if (in libs 3)
  1126.                 (
  1127.                     (set libname "rexxtools.library")
  1128.                     (InstallLib)
  1129.                 )
  1130.             )
  1131.  
  1132.             (if (in libs 4)
  1133.                 (
  1134.                     (set libname "xpkmaster.library")
  1135.                     (InstallLib)
  1136.                 )
  1137.             )
  1138.  
  1139.             (if (in libs 5)
  1140.                 (
  1141.                     (set libname "unpack.library")
  1142.                     (InstallLib)
  1143.                 )
  1144.             )
  1145.         (DeleteAll)
  1146.         )
  1147.     )
  1148.     (complete 50)
  1149.  
  1150.  
  1151.     (if xpk
  1152.         (
  1153.             (makedir "LIBS:compressors")
  1154.             (working "Unpacking XPK-Subs archive....")
  1155.             (run ("\"%s\" -fqw=%s x Files/XPKSubs.lha >NIL:" lhex tempdir))
  1156.             (set libdest "LIBS:compressors/")
  1157.  
  1158.             (if (in xpk 0)
  1159.                 (
  1160.                     (set libname "xpkSMPL.library")
  1161.                     (InstallLib)
  1162.                 )
  1163.             )
  1164.  
  1165.             (if (in xpk 1)
  1166.                 (
  1167.                     (working ("Testing compressors/xpkSQSH.library"))
  1168.                     (copylib
  1169.                         (prompt ("Do you want to install the \"compressors/xpkSQSH.library\"?"))
  1170.                         (help @copylib-help)
  1171.                         (source (tackon tempdir "xpkSQSH000.library"))
  1172.                         (dest libdest)
  1173.                         (newname "xpkSQSH.library")
  1174.                         (confirm)
  1175.                     )
  1176.                 )
  1177.             )
  1178.  
  1179.             (if (in xpk 2)
  1180.                 (
  1181.                     (working ("Testing compressors/xpkSQSH.library"))
  1182.                     (copylib
  1183.                         (prompt ("Do you want to install the \"compressors/xpkSQSH.library\"?"))
  1184.                         (help @copylib-help)
  1185.                         (source (tackon tempdir "xpkSQSH020.library"))
  1186.                         (dest libdest)
  1187.                         (newname "xpkSQSH.library")
  1188.                         (confirm)
  1189.                     )
  1190.                 )
  1191.             )
  1192.         (DeleteAll)
  1193.         )
  1194.     )
  1195.     (complete 60)
  1196.  
  1197.  
  1198.     (if arexx
  1199.         (
  1200.             (set arexxdir (tackon @default-dest "ARexx"))
  1201.             (makedir arexxdir)
  1202.             (working "Unpacking ARexx archive....")
  1203.             (run ("\"%s\" -fqw=%s x Files/ARexx.lha >NIL:" lhex arexxdir))
  1204.         )
  1205.     )
  1206.     (complete 70)
  1207.  
  1208.  
  1209.     (if doc
  1210.         (
  1211.             (set docdir (tackon @default-dest "Docs"))
  1212.             (makedir (tackon @default-dest "Docs") (infos))
  1213.             (working "Unpacking Docs archive....")
  1214.             (run ("\"%s\" -fqw=%s x Files/Docs.lha >NIL:" lhex tempdir))
  1215.  
  1216.             (if (in docflag 0)
  1217.                 (
  1218.                     (copyfiles
  1219.                         (source (tackon tempdir "APlayer.guide"))
  1220.                         (dest docdir)
  1221.                         (infos)
  1222.                     )
  1223.                 )
  1224.             )
  1225.  
  1226.             (if (in docflag 1)
  1227.                 (
  1228.                     (copyfiles
  1229.                         (source (tackon tempdir "MissingModules.txt"))
  1230.                         (dest docdir)
  1231.                         (infos)
  1232.                     )
  1233.                 )
  1234.             )
  1235.  
  1236.             (if (in docflag 2)
  1237.                 (
  1238.                     (copyfiles
  1239.                         (source (tackon tempdir "PlaySid.doc"))
  1240.                         (dest docdir)
  1241.                         (infos)
  1242.                     )
  1243.                 )
  1244.             )
  1245.  
  1246.             (if (in docflag 3)
  1247.                 (
  1248.                     (copyfiles
  1249.                         (source (tackon tempdir "SMPL.doc"))
  1250.                         (dest docdir)
  1251.                         (infos)
  1252.                     )
  1253.                 )
  1254.             )
  1255.  
  1256.             (if (in docflag 4)
  1257.                 (
  1258.                     (copyfiles
  1259.                         (source (tackon tempdir "SQSH.doc"))
  1260.                         (dest docdir)
  1261.                         (infos)
  1262.                     )
  1263.                 )
  1264.             )
  1265.  
  1266.             (if (in docflag 5)
  1267.                 (
  1268.                     (delete (tackon docdir "Unpack.doc"))
  1269.                     (delete (tackon docdir "Unpack.doc.info"))
  1270.                     (copyfiles
  1271.                         (source (tackon tempdir "Unpacker.guide"))
  1272.                         (dest docdir)
  1273.                         (infos)
  1274.                     )
  1275.                 )
  1276.             )
  1277.  
  1278.             (if (in docflag 6)
  1279.                 (
  1280.                     (copyfiles
  1281.                         (source (tackon tempdir "RegistrationForm"))
  1282.                         (dest docdir)
  1283.                         (infos)
  1284.                     )
  1285.                 )
  1286.             )
  1287.  
  1288.             (if (in docflag 7)
  1289.                 (
  1290.                     (copyfiles
  1291.                         (source (tackon sdir "HDInstall"))
  1292.                         (dest @default-dest)
  1293.                         (infos)
  1294.                     )
  1295.                 )
  1296.             )
  1297.         (delete (tackon docdir "Bonus.doc"))
  1298.         (delete (tackon docdir "Bonus.doc.info"))
  1299.         (DeleteAll)
  1300.         )
  1301.     )
  1302.     (complete 80)
  1303.  
  1304.  
  1305.     (if developer
  1306.         (
  1307.             (set devdir (tackon @default-dest "Developer"))
  1308.             (makedir devdir)
  1309.             (working "Unpacking Developer archive....")
  1310.             (run ("\"%s\" -fqw=%s x Files/Developer.lha >NIL:" lhex devdir))
  1311.         )
  1312.     )
  1313.     (complete 90)
  1314.  
  1315. ; Delete Bonus Files
  1316.  
  1317.     (set deldir (tackon @default-dest "Bonus"))
  1318.     (DeleteAll)
  1319.  
  1320.  
  1321. ; Fix the configuration files
  1322.  
  1323.     (if (exists "ENVARC:APlayer/")
  1324.         (
  1325.             (makedir "ENVARC:APlayer/Players")
  1326.             (makedir "ENVARC:APlayer/NotePlayers")
  1327.  
  1328.             (delete "ENVARC:APlayer/IFF-8SVX.cfg")
  1329.             (delete "ENVARC:APlayer/Players/IFF-8SVX.cfg")
  1330.             (delete "ENVARC:APlayer/IFF-AIFF.cfg")
  1331.             (delete "ENVARC:APlayer/Players/IFF-AIFF.cfg")
  1332.             (delete "ENVARC:APlayer/Players/RIFF-WAVE.cfg")
  1333.             (delete "ENVARC:APlayer/NotePlayers/FastMem4.cfg")
  1334.  
  1335.             (delete "ENVARC:APlayer/Protracker.cfg")
  1336.             (delete "ENVARC:APlayer/Players/Protracker.cfg")
  1337.  
  1338.             (if (exists "ENVARC:APlayer/APlayer.prefs")
  1339.                 (
  1340.                     (if (askbool
  1341.                             (prompt "Do you want to convert your old preference"
  1342.                                 "file to the new format?")
  1343.                             (help "From this version of APlayer, the file format"
  1344.                                 " of the preference file is changed. Therefore"
  1345.                                 " you have to convert your preference file to"
  1346.                                 " the new format if you want to use your old"
  1347.                                 " settings.")
  1348.                         )
  1349.                         (
  1350.                             (run ("\"%s\" >ENV:convtxt" (tackon sdir "C/PrefsConvert")))
  1351.  
  1352.                             (if (not (exists "ENVARC:APlayer/APlayer2.0.prefs"))
  1353.                                 (
  1354.                                     (message "Something went wrong when converting!!!\n\n"
  1355.                                         ("%s" (getenv "convtxt")))
  1356.                                 )
  1357.                                 (
  1358.                                     (if (askbool
  1359.                                             (prompt "You now have a new preference file."
  1360.                                                 " Do you want to delete your"
  1361.                                                 " old preference files and rename the new "
  1362.                                                 "one?")
  1363.                                             (help "")
  1364.                                         )
  1365.                                         (
  1366.                                             (delete "ENVARC:APlayer/APlayer.prefs")
  1367.                                             (delete "ENVARC:APlayer/APlayer.win")
  1368.                                             (delete "ENVARC:APlayer/APlayer.arexx")
  1369.                                             (rename "ENVARC:APlayer/APlayer2.0.prefs" "ENVARC:APlayer/APlayer.prefs")
  1370.                                             (rename "ENVARC:APlayer/APlayer2.0.win" "ENVARC:APlayer/APlayer.win")
  1371.                                         )
  1372.                                     )
  1373.                                 )
  1374.                             )
  1375.                             (delete "ENV:convtxt")
  1376.                         )
  1377.                     )
  1378.                 )
  1379.             )
  1380.         )
  1381.     )
  1382.     (complete 100)
  1383.     (delete deldir)
  1384.  
  1385.     (message "You have to reset your computer before using APlayer.")
  1386. )
  1387.  
  1388. ;--------------------------------------------------------------------------
  1389. ; ** Remove Procedure
  1390.  
  1391. (procedure Remove
  1392.     (if (askbool
  1393.             (prompt "This procedure will remove all files associated to "
  1394.                     "the APlayer program. This means the program, docs, "
  1395.                     "preference files and all extern players.\n\n"
  1396.                     "Are you sure you want to continue?")
  1397.             (help "")
  1398.         )
  1399.  
  1400.         (
  1401.             (set @default-dest
  1402.                 (askdir
  1403.                     (prompt "Select where the \"APlayer\" drawer are "
  1404.                             "stored.")
  1405.                     (help @askdir-help)
  1406.                     (default @default-dest)
  1407.                 )
  1408.             )
  1409.  
  1410.             (working "Deleting the \"APlayer\" drawer...")
  1411.             (set ddir (tackon @default-dest "APlayer"))
  1412.  
  1413.             (set deldir (tackon ddir "Data"))
  1414.             (DeleteAll)
  1415.  
  1416.             (set deldir (tackon ddir "ARexx"))
  1417.             (DeleteAll)
  1418.  
  1419.             (set deldir (tackon ddir "Bonus"))
  1420.             (DeleteAll)
  1421.  
  1422.             (set deldir (tackon ddir "Docs"))
  1423.             (DeleteAll)
  1424.  
  1425.             (set deldir (tackon ddir "Developer/Examples"))
  1426.             (DeleteAll)
  1427.             (set deldir (tackon ddir "Developer/Include3.0/Own"))
  1428.             (DeleteAll)
  1429.             (set deldir (tackon ddir "Developer/Include3.0"))
  1430.             (DeleteAll)
  1431.             (set deldir (tackon ddir "Developer/Rexxtools/Doc"))
  1432.             (DeleteAll)
  1433.             (set deldir (tackon ddir "Developer/Rexxtools/FD"))
  1434.             (DeleteAll)
  1435.             (set deldir (tackon ddir "Developer/Rexxtools/Include/CLib"))
  1436.             (DeleteAll)
  1437.             (set deldir (tackon ddir "Developer/Rexxtools/Include/Libraries"))
  1438.             (DeleteAll)
  1439.             (set deldir (tackon ddir "Developer/Rexxtools/Include/Pragmas"))
  1440.             (DeleteAll)
  1441.             (set deldir (tackon ddir "Developer/Rexxtools/Include/Proto"))
  1442.             (DeleteAll)
  1443.             (set deldir (tackon ddir "Developer/Rexxtools/Include"))
  1444.             (DeleteAll)
  1445.             (set deldir (tackon ddir "Developer/Rexxtools/Libs"))
  1446.             (DeleteAll)
  1447.             (set deldir (tackon ddir "Developer/Rexxtools"))
  1448.             (DeleteAll)
  1449.             (set deldir (tackon ddir "Developer"))
  1450.             (DeleteAll)
  1451.  
  1452.             (set deldir ddir)
  1453.             (DeleteAll)
  1454.  
  1455.             (delete ddir)
  1456.             (delete (tackon @default-dest "APlayer.info"))
  1457.  
  1458.             (delete "S:APlayer.FSS")
  1459.             (complete 20)
  1460.  
  1461.  
  1462.             (working "Deleting preference files...")
  1463.             (set ddir "ENVARC:APlayer")
  1464.             (set deldir (tackon ddir "Players"))
  1465.             (DeleteAll)
  1466.             (set deldir (tackon ddir "NotePlayers"))
  1467.             (DeleteAll)
  1468.             (set deldir (tackon ddir "Agents"))
  1469.             (DeleteAll)
  1470.             (set deldir ddir)
  1471.             (DeleteAll)
  1472.             (delete "ENVARC:APlayer")
  1473.             (complete 40)
  1474.  
  1475.             (working "Deleting external Agents...")
  1476.             (set deldir "LIBS:APlayer/Agents/MSSModules")
  1477.             (DeleteAll)
  1478.             (set deldir "LIBS:APlayer/Agents")
  1479.             (DeleteAll)
  1480.             (delete "LIBS:APlayer/Agents")
  1481.             (complete 60)
  1482.  
  1483.             (working "Deleting external NotePlayers...")
  1484.             (set deldir "LIBS:APlayer/NotePlayers")
  1485.             (DeleteAll)
  1486.             (delete "LIBS:APlayer/NotePlayers")
  1487.             (complete 80)
  1488.  
  1489.             (working "Deleting external players...")
  1490.             (set deldir "LIBS:APlayer")
  1491.             (DeleteAll)
  1492.             (delete "LIBS:APlayer")
  1493.             (complete 100)
  1494.         )
  1495.     )
  1496. )
  1497.  
  1498. ;--------------------------------------------------------------------------
  1499. ; ** Main Stript
  1500.  
  1501. (complete 0)
  1502. (set sdir (pathonly @icon))
  1503.  
  1504. (if (< (/ (getversion) 65536) 37)
  1505.     (abort "You must have Kickstart 2.0 or greater to use this installation"
  1506.            " utility and to run \"Accessible Player\".")
  1507. )
  1508.  
  1509. (message "This installer script will help you to install/remove "
  1510.          "\"Accessible Player\" to/from your hard disk.\n"
  1511.          "If you don't own one, abort immediately.")
  1512.  
  1513. (welcome)
  1514.  
  1515.  
  1516. ; ** Ask to Install Or Remove
  1517.  
  1518. (set askflag (askbool
  1519.                 (prompt "Do you want to install or remove "
  1520.                         "\"Accessible Player\"?")
  1521.                 (help "")
  1522.                 (choices "Install" "Remove")
  1523.              )
  1524. )
  1525.  
  1526. (if askflag
  1527.     (Install)                       ;Start Install Procedure
  1528.     (Remove)                        ;Start Remove Procedure
  1529. )
  1530.